import request from '@/utils/request'

/****** 以下为 -- 案件挂起 -- 待审批案件 -- 全部案件 -- 评价统计-- 页面相关接口 ******/

/****** -- 案件挂起 -- 页面相关接口 ******/
// 获取挂起案件列表
export function eventPend(data) {
    return request({
        url: '/business/event/eventPend/list',
        method: 'post',
        data:data
    })
}

//批量结束挂起
export function saveEventPendEnds(data) {
    return request({
        url: '/business/event/eventPend/saveEventPendEnds',
        method: 'post',
        data:data
    })
}

//单个案件结束挂起
export function saveEventPendEnd(data) {
    return request({
        url: '/business/event/eventPend/saveEventPendEnd',
        method: 'put',
        data:data
    })
}



/****** -- 待审批案件 -- 页面相关接口 ******/
// 获取待审批案件列表
export function eventApproval(data) {
    return request({
        url: '/business/event/eventApproval/list',
        method: 'post',
        data:data
    })
}

//缓办审批
export function updateEventSlow(data) {
    return request({
        url: '/business/event/eventApproval/updateEventSlow',
        method: 'put',
        data:data
    })
}

//延期审批
export function updateEventDelay(data) {
    return request({
        url: '/business/event/eventApproval/updateEventDelay',
        method: 'put',
        data:data
    })
}


/****** -- 全部案件 -- 页面相关接口 ******/
// 获取全部案件列表
export function getAllEvents(data) {
    return request({
        url: '/business/event/event/getAllEvents',
        method: 'post',
        data:data
    })
}

//案件来源
export function eventSrc() {
    return request({
        url: '/szcg/common/dict/eventSrc',
        method: 'get'
    })
}

//获取立案条件
export function eventTypelv3(data) {
    return request({
        url: '/szcg/common/dict/eventTypelv3/'+ data.parentId,
        method: 'get'
    })
}

//获取是否转办状态（案件流程大状态）
export function getEventStatus() {
    return request({
        url: '/szcg/common/dict/getEventStatus',
        method: 'get'
    })
}

//根据案件是否转办状态获取案件状态
export function getEventStatusLv2(data) {
    return request({
        url: '/szcg/common/dict/getEventStatusLv2/'+data.code,
        method: 'get'
    })
}

//案件详情
export function getEventInfoByEventId(data) {
    return request({
        url: '/business/event/event/getEventInfoByEventId/'+ data.eventId,
        method: 'get'
    })
}

//案件日志
export function getEventLogList(data) {
    return request({
        url: '/business/event/eventLog/getEventLogList/'+ data.eventId,
        method: 'get'
    })
}

/****** -- 评价统计 -- 页面相关接口 ******/
//获取评价统计的列表数据
export function getEventEvaluateList(data) {
    return request({
        url: '/business/event/eventEvaluate/list',
        method: 'post',
        data: data
    })
}

//不合格的案件进行重新处置
export function saveCirculationEvent(data) {
    return request({
        url: '/business/event/eventEvaluate/saveCirculationEvent',
        method: 'post',
        data: data
    })
}
